import java.util.*;

public class Main {
    public static void main(String[] args) {
       Scanner sc=new Scanner(System.in);
        while(sc.hasNext()){
            String s=sc.nextLine();
            char[] ch=s.toCharArray();
            int[] count=new int[128];
            for(int i=0;i<s.length();i++){
                count[ch[i]]++;
            }
            boolean flag=false;
            for (int i = 0; i < ch.length; i++) {
                if (count[ch[i]]==1){
                    System.out.println(ch[i]);
                    flag=true;
                    break;
                }
            }
            if (flag==false)
                System.out.println(-1);

        }
    }
}